home *** CD-ROM | disk | FTP | other *** search
- /*
- IMAGE FX GRADUAL CONTRAST
- By J.L. White
- ©1994 Merlin's Software
-
- Apply Contrast To Sequence Of Images Gradually Over Time
- ImageFX Script
-
- Batch Factory Batch Conversion Scripts are basically Arexx scripts that
- allow you to pass certain parameters to the external program you wish
- to use to convert the images from one format to another. You can pass
- five different strings from Batch Factory to the script by using the
- following commands:
-
- $N = This will pass the current selected filename.
- $P = This will tell Batch Factory to ask for a path to save new frames to.
- $# = This will pass the current frame number in the script.
- $T = This will pass the total number of frames in the script.
- $A = This will pass an offset number to be used to save frames with.
-
- NOTE: The following line is required to work as a Batch Factory Script:
-
- PARSE=$N $P $# $T $A
-
- */
-
- options results
- call Locate_ImageFX
-
- address "IMAGEFX.1"
- arg InPic OutPic FrameNum TotalFiles AddNum
- SaveNum = FrameNum + AddNum
-
- if FrameNum = 1 then do
- ScreenToFront
- Gadget.1 = 'Select Direction To Use!'
- Gadget.2 = 'UP'
- Gadget.3 = 'DOWN'
- ListRequest 3 Gadget
- if result = 2 then Answer = "UP"
- if result = 3 then Answer = "DOWN"
- call open TempFile,"Ram:IFGC",W
- call writeln TempFile,Answer
- call close TempFile
- end
- else do
- call open TempFile,"Ram:IFGC",R
- line = readln(TempFile)
- parse var line Answer
- call close TempFile
- end
- if FrameNum = TotalFiles then do
- address command "delete >NIL: Ram:IFGC"
- end
-
- LoadBuffer InPic Force Smooth
- Num = ((FrameNum * 127)/(TotalFiles))
- if FrameNum > 1 then do
- if Answer = "UP" then
- Contrast Num
- else
- Contrast 0-Num
- end
-
- if OutPic = "SAME" then
- SaveBufferAs ILBM InPic
- else
- SaveBufferAs ILBM OutPic""right(SaveNum,3,'0')
- exit
-
- Locate_ImageFX:
- if (POS('IMAGEFX.1',SHOW('Ports')) = 0)
- then do
- address command 'run < nil: > nil: IMAGEFX:ImageFX'
- address command 'wait 7'
- end
- return
-
-